import request from '@/utils/request'

/**
 * 分页
 */
export function activity_page(params) {
  return request({
    url: '/api/brandActivity/pagination',
    method: 'post',
    data: params
  })
}

/**
 * 添加
 */
export function activity_add(params) {
  return request({
    url: '/api/brandActivity',
    method: 'post',
    data: params
  })
}

/**
 * 删除
 */
export function activity_del(params) {
  return request({
    url: `/api/brandActivity/${params.id}`,
    method: 'delete'
  })
}

/**
 * 修改
 */
export function activity_change(params) {
  return request({
    url: `/api/brandActivity/${params.id}`,
    method: 'put',
    data: params.content
  })
}

/**
 * 上下架
 */
export function activity_status(params) {
  return request({
    url: `/api/brandActivity/status/${params.id}`,
    method: 'put',
    data: params.content
  })
}
